<script setup lang="ts">
import { useUserstore } from '@/stores/user';
import { useRouter } from 'vue-router';
const user=useUserstore()
const router=useRouter()
function logout(){
  user.changeUseState({
    loginState:false,
    userid:'',
    token:''
  })
  router.push('/')
}


</script>

<template>
<main class="box">
    <header class="header">
      <slot name="left"></slot>
      我的
      <slot name="right"></slot>
     </header>

    <div class="content">
      <van-button @click="logout">退出登录</van-button>
    </div>
  </main>
</template>